import { DashboardIcon } from 'tdesign-icons-vue-next';
import { shallowRef } from 'vue';
import Layout from '@/layouts/index.vue';

export default [
  {
    path: '/dashboard',
    component: Layout,
    redirect: '/dashboard/base',
    name: 'dashboard',
    meta: {
      title: '工作台',
      icon: shallowRef(DashboardIcon),
      orderNo: 0,
      single: true,
    },
    children: [
      {
        path: 'base',
        name: 'DashboardBase',
        component: () => import('@/pages/dashboard/base/index.vue'),
        meta: {
          title: '概览仪表盘',
        },
      },
    ],
  },
  {
    path: '/resource',
    component: Layout,
    redirect: '/resource/app',
    name: 'resource',
    meta: {
      title: '我的资源',
      icon: 'layers',
      orderNo: 1,
    },
    children: [
      {
        path: 'app',
        name: 'ResourceApp',
        component: () => import('@/pages/resource/app/index.vue'),
        meta: {
          title: '应用',
        },
      },
      {
        path: 'vm',
        name: 'ResourceVm',
        component: () => import('@/pages/list/base/index.vue'),
        meta: {
          title: '虚拟机',
        },
      },
      {
        path: 'data',
        name: 'ResourceData',
        component: () => import('@/pages/list/base/index.vue'),
        meta: {
          title: '数据库',
        },
      },
      {
        path: 'pm',
        name: 'ResourcePm',
        component: () => import('@/pages/list/base/index.vue'),
        meta: {
          title: '物理机',
        },
      },
    ],
  },
  {
    path: '/plan',
    component: Layout,
    redirect: '/plan/base',
    name: 'plan',
    meta: {
      title: '我的计划',
      icon: 'view-list',
      orderNo: 2,
      single: true,
    },
    children: [
      {
        path: 'base',
        name: 'PlanBase',
        component: () => import('@/pages/list/base/index.vue'),
        meta: {
          title: '我的计划',
        },
      },
    ],
  },
  {
    path: '/feedback',
    component: Layout,
    redirect: '/feedback/create',
    name: 'feedback',
    meta: {
      title: '我的反馈',
      icon: 'pin',
      orderNo: 3,
    },
    children: [
      {
        path: 'create',
        name: 'FeedbackCreate',
        component: () => import('@/pages/feedback/create/index.vue'),
        meta: {
          title: '新建反馈',
        },
      },
      {
        path: 'base',
        name: 'NoticeBase',
        component: () => import('@/pages/feedback/list/index.vue'),
        meta: {
          title: '反馈查询',
        },
      },
    ],
  },
  {
    path: '/honour',
    component: Layout,
    redirect: '/honour/base',
    name: 'honour',
    meta: {
      title: '我的荣誉',
      icon: 'books',
      orderNo: 4,
      single: true,
    },
    children: [
      {
        path: 'base',
        name: 'HonourBase',
        component: () => import('@/pages/user/index.vue'),
        meta: {
          title: '我的荣誉',
        },
      },
    ],
  },
];
